<template>
	<player-mobile v-if="$isMobile"></player-mobile>
	<player-pc v-else></player-pc>
</template>

<script setup>
import { inject, onMounted, ref, provide, computed, watch } from 'vue'
import { useRoute } from 'vue-router'
import { useStore } from 'vuex'
import PlayerPc from './modules/pc/index.vue'
import PlayerMobile from './modules/mobile/index.vue'
import useUtils from "@/hooks/useUtils.js";


const route = useRoute()
const store = useStore()

const $isMobile = inject('$isMobile')
const api = inject('api')
const openid = ref('')

// 获取openid
function getLiveinfo () {
	openid.value = useUtils().getOpenid()
	store.dispatch('live/apiGetLiveDetail', {
		id: route.params.id,
		auid: openid.value
	})
}



onMounted(() => {
	getLiveinfo();
})
</script>

<style lang="less" scoped>
/*{
	背景色：--background-color
	header背景色：--header-background-color
}*/
</style>
